#include "e2d/yml/impl/Serializer.h"
#include "e2d/core/impl/components.h"
#include "e2d/core/Inst.h"

using Serializer = e2d::BasicSerializer;

template<>
 void Serializer::Encode<e2d::Inst>(YAML::Node& node, const e2d::Inst& inst)
{
	SetVariable<fxcc::FileHeader>(node, "m_FileHeader", inst.m_FileHeader);
	SetVariable<e2d::Scene>(node, "m_Scene", *inst.m_Scene);

}


template<>
 bool Serializer::Decode<e2d::Inst>(const YAML::Node& node, e2d::Inst& inst)
{
	GetVariable<fxcc::FileHeader>(node, "m_FileHeader", inst.m_FileHeader);
	GetVariable<e2d::Scene>(node, "m_Scene", *inst.m_Scene);

	return true;
}
